package com.yowasa.xiuxian.engine.hone.special;

import com.yowasa.xiuxian.annoations.SE;
import com.yowasa.xiuxian.engine.hone.SpecialInterface;
import com.yowasa.xiuxian.entity.bo.user.UserBO;
import com.yowasa.xiuxian.entity.bo.user.UserBattle;
import com.yowasa.xiuxian.entity.enums.ElementEnum;
import com.yowasa.xiuxian.entity.enums.StageEnum;
import com.yowasa.xiuxian.exception.HandlerException;

@SE(name = "北极剑煞")
public class BeiJiJianSha implements SpecialInterface {
    @Override
    public ElementEnum getElement() {
        return ElementEnum.GOLD;
    }

    @Override
    public void limit(UserBO user) {
        if (user.getStage() < StageEnum.JIE_DAN.getLevel()) {
            throw new HandlerException("学习/使用北极剑煞必须要了彻之白以上");
        }
    }

    @Override
    public String limitDesc() {
        return "境界达到了彻之白";
    }

    @Override
    public String desc() {
        return "修习之后攻击力提升30%";
    }

    @Override
    public void effectBattle(UserBO userBO,UserBattle userBattle) {
        userBattle.setAtk((int) (userBattle.getAtk() + userBO.getUserOriginBattle().getAtk() * 0.3));
    }
}
